package com.test.sshsitemesh.framework;

import org.sitemesh.SiteMeshContext;
import org.sitemesh.content.ContentProperty;
import org.sitemesh.content.tagrules.TagRuleBundle;
import org.sitemesh.content.tagrules.html.ExportTagToContentRule;
import org.sitemesh.tagprocessor.State;

public class CustomSiteMeshTagRuleBundle implements TagRuleBundle {

	@Override
	public void install(State defaultState, ContentProperty contentProperty,
			              SiteMeshContext siteMeshContext) {

		defaultState.addRule("menu", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("menu"), false));
		defaultState.addRule("submenu", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("submenu"), false));
		defaultState.addRule("codemenuactive", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("codemenuactive"), false));
		defaultState.addRule("salespromotionmenuactive", new ExportTagToContentRule(siteMeshContext, contentProperty.getChild("salespromotionmenuactive"), false));
	}

	@Override
	public void cleanUp(State defaultState, ContentProperty contentProperty,
	             SiteMeshContext siteMeshContext) {
	     }


}
